// pages/mall/mall.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    index: 0,
    array: ['不限分类', '食材', '粮油调料', '酒水饮料', '综合用品', '厨房用具'],
    starindex: 0,
    stararray: ['不限积分', '0-200', '200-500', '500-1000', '1000-2000', '2000以上'],
    cplist: [
      { title: '产品名称', price: '200', img: '../../resource/image/cp1.jpg', id: 23 },
      { title: '产品名称', price: '100', img: '../../resource/image/cp1.jpg', id: 23 },
      { title: '产品名称', price: '4200', img: '../../resource/image/cp1.jpg', id: 23 },
      { title: '产品名称', price: '3600', img: '../../resource/image/cp1.jpg', id: 23 },
      { title: '产品名称', price: '10', img: '../../resource/image/cp1.jpg', id: 23 },
      { title: '产品名称', price: '8888', img: '../../resource/image/cp1.jpg', id: 23 }
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onShareAppMessage: function () {
      return {
        title: '餐饮酒店B2B云智能采购平台小程序!',
        desc: '众源实业'
      }
    },
    bindPickerChange: function (e) {
      console.log('picker发送选择改变，携带值为', e.detail.value)
      this.setData({
        index: e.detail.value
      })
    },
    bindPickerStar: function (e) {
      console.log('picker发送选择改变，携带值为', e.detail.value)
      this.setData({
        starindex: e.detail.value
      })
    }
  }
})
